<template>
  <div class="box">
    <el-breadcrumb separator=">">
      <el-breadcrumb-item to="/login" replace>首页</el-breadcrumb-item>
      <el-breadcrumb-item>平台运营</el-breadcrumb-item>
      <el-breadcrumb-item>商城关键词</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="tableBox">
      <div class="tableTitle">商城关键词</div>
      <div class="searchBox">
        <el-form size="mini" inline>
          <div class="block">
            <el-form-item>
              <el-button type="primary" icon="el-icon-circle-plus" @click="onAddKeyword">新增</el-button>
            </el-form-item>
          </div>
        </el-form>
      </div>
      <el-table :data="tableData">
        <el-table-column prop="" label="编号" align="center"></el-table-column>
        <el-table-column prop="" label="热词" align="center"></el-table-column>
        <el-table-column prop="" label="关键词类型" align="center"></el-table-column>
        <el-table-column prop="" label="显示序号" align="center"></el-table-column>
        <el-table-column prop="" label="创建时间" align="center"></el-table-column>
        <el-table-column label="操作" align="center">
          <template slot-scope="data">
            <span class="colors" @click="close(data.row)">删除</span>/<span class="colors"
                                                                          @click="modify(data.row)">编辑</span>
          </template>
        </el-table-column>
      </el-table>
      <div class="addKeyword" v-if="showAddKeyword">
        <el-form :model="keyword" size="mini">
          <el-form-item label="热词">
            <el-input v-model="keyword.name"></el-input>
            <span>标题不能超过30个字符</span>
          </el-form-item>
          <el-form-item label="热词排序">
            <el-input v-model="keyword.name"></el-input>
            <span>排序</span>
          </el-form-item>
          <el-form-item label="热词类型">
            <el-input v-model="keyword.name"></el-input>
            <span>0发现身边 1系统设置的词(运营人员设置:最多不能超过50个字)</span>
          </el-form-item>
          <el-form-item label="">
            <el-button type="primary" @click="addKeyword">确认提交</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
    data () {
      return {
        tableData: [],
        keyword: {},
        showAddKeyword: false
      }
    },
    created () {
    },
    methods: {
      modify (item) {
      },
      close (item) {
      },
      onAddKeyword () {
        this.showAddKeyword = !this.showAddKeyword
      },
      addKeyword () {
      }
    },
    components: {}
  }
</script>

<style lang="less" ref="stylesheet/less" scoped>
.addKeyword{
  .el-form{
    padding: 20px;
    .el-form-item{
      .el-input{
        width: 20%;
      }
      span{
        padding-left: 10px;
      }
    }
  }
}
</style>
